package com.interview.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by fangjicai on 2020/4/9.
 */
@RestController
public class TestController {
    @Value("${server.port}")
    private int port;
    @GetMapping("/name/{id}")
    public String getName(@PathVariable("id") String id){
      // int a= 1/0;
        return new StringBuilder("jicai").append("--").append(id)
                .append("--").append(port).toString();
    }
}
